home *** CD-ROM | disk | FTP | other *** search
- Path: lyra.csx.cam.ac.uk!news
- From: timc@chiark.chu.cam.ac.uk (Tim Cutts)
- Newsgroups: comp.lang.c++,comp.lang.c,comp.os.ms-windows.programmer.misc
- Subject: sscanf (was Re: Can 'fscanf' be used in 16-bit DLL?)
- Date: 29 Feb 1996 12:36:34 +0000 (GMT)
- Organization: Linux Unlimited
- Message-ID: <+oi*0Dwtm@myrddin.chu.cam.ac.uk>
- References: <DMrn2J.5F7.0.-s@hkusuc.hku.hk> <824322633snz@chrism.demon.co.uk>
- NNTP-Posting-Host: myrddin.chu.cam.ac.uk
- Originator: timc@chiark.chu.cam.ac.uk (UNIX:@[131.111.131.114])
-
- In article <824322633snz@chrism.demon.co.uk>,
- Chris Marriott <chris@chrism.demon.co.uk> wrote:
- >In article <DMrn2J.5F7.0.-s@hkusuc.hku.hk> h8817968@hkuxb.hku.hk "Daniel" writes:
- >
- >>I am trying to make a 16-bit DLL by using MSVC V1.51 but, when I
- >>compile the program, it gives me the follwing warning:
- >>
- >>warning C4013: 'fscanf' undefined; assuming extern returning int
- >>
- >>As expected, the linking stage gives me the following:
- >>
- >>error L2029: '_fscanf' : unresolved external
- >>
- >>It seems that 'fscanf' cannot be used if you want to produce a
- >>DLL. Can anyone tell me whether my guess is true? If no, what
- >>should I do if I want to use 'fscanf'. If yes, is there any
- >>alternative function usable?
- >
- >One option is simply not to define "_WINDLL". I used to use "fscanf" in
- >DLLs and it appears to work OK.
-
- This approach does not work for sscanf in VC++ 1.52. It is not
- present in ldllcew.lib. I tried extracting sscanf() and input() from
- llibcew.lib with LIB.EXE, and linking the obj files directly, but the
- result was a GPF when the sscanf() was called.
-
- Has anyone written an sscanf() function that can be used in DLLs? I
- can't think for the life of me why MS decided to exclude it. In VC++
- 2.1, the RTL always has it (this DLL I'm writing works fine as a
- 32-bit DLL).
-
- Tim.
-
-